System basis chip abstraction layer for airbag application. Upper layers shouldn't talk directly with the SBC driver to avoid file dependencies in the application.
More...
Defines |
|
#define | TRUE (1u) |
|
#define | CLEAR (0u) |
|
#define | BITS_IN_BYTE (8u) |
|
#define | BYTES_IN_16 (2u) |
|
#define | BYTES_IN_32 (4u) |
|
#define | BIT_DEFINITION |
|
#define | BIT0 (1u << 0u) |
|
#define | BIT1 (1u << 1u) |
|
#define | BIT2 (1u << 2u) |
|
#define | BIT3 (1u << 3u) |
|
#define | BIT4 (1u << 4u) |
|
#define | BIT5 (1u << 5u) |
|
#define | BIT6 (1u << 6u) |
|
#define | BIT7 (1u << 7u) |
|
#define | BIT8 (1u << 8u) |
|
#define | BIT9 (1u << 9u) |
|
#define | BIT10 (1u << 10) |
|
#define | BIT11 (1u << 11) |
|
#define | BIT12 (1u << 12) |
|
#define | BIT13 (1u << 13) |
|
#define | BIT14 (1u << 14) |
|
#define | BIT15 (1u << 15) |
|
#define | BIT16 (1u << 16) |
|
#define | BIT17 (1u << 17) |
|
#define | BIT18 (1u << 18) |
|
#define | BIT19 (1u << 19) |
|
#define | BIT20 (1u << 20) |
|
#define | BIT21 (1u << 21) |
|
#define | BIT22 (1u << 22) |
|
#define | BIT23 (1u << 23) |
|
#define | BIT24 (1u << 24) |
|
#define | BIT25 (1u << 25) |
|
#define | BIT26 (1u << 26) |
|
#define | BIT27 (1u << 27) |
|
#define | BIT28 (1u << 28) |
|
#define | BIT29 (1u << 29) |
|
#define | BIT30 (1u << 30) |
|
#define | BIT31 (1u << 31) |
|
#define | SQUIB_CH0_PRESENT (BIT0) |
|
#define | SQUIB_CH0_ABSENT (0u) |
|
#define | SQUIB_CH1_PRESENT (BIT1) |
|
#define | SQUIB_CH1_ABSENT (0u) |
|
#define | SQUIB_CH2_PRESENT (BIT2) |
|
#define | SQUIB_CH2_ABSENT (0u) |
|
#define | SQUIB_CH3_PRESENT (BIT3) |
|
#define | SQUIB_CH3_ABSENT (0u) |
|
#define | SQUIB_CH4_PRESENT (BIT4) |
|
#define | SQUIB_CH4_ABSENT (0u) |
|
#define | SQUIB_CH5_PRESENT (BIT5) |
|
#define | SQUIB_CH5_ABSENT (0u) |
|
#define | SQUIB_CH6_PRESENT (BIT6) |
|
#define | SQUIB_CH6_ABSENT (0u) |
|
#define | SQUIB_CH7_PRESENT (BIT7) |
|
#define | SQUIB_CH7_ABSENT (0u) |
|
#define | SQUIB_CH8_PRESENT (BIT8) |
|
#define | SQUIB_CH8_ABSENT (0u) |
|
#define | SQUIB_CH9_PRESENT (BIT9) |
|
#define | SQUIB_CH9_ABSENT (0u) |
|
#define | SQUIB_CH10_PRESENT (BIT10) |
|
#define | SQUIB_CH10_ABSENT (0u) |
|
#define | SQUIB_CH11_PRESENT (BIT11) |
|
#define | SQUIB_CH11_ABSENT (0u) |
|
#define | SAT_CH0_SLOT0_PRESENT (BIT0) |
|
#define | SAT_CH0_SLOT0_ABSENT (0u) |
|
#define | SAT_CH0_SLOT1_PRESENT (BIT1) |
|
#define | SAT_CH0_SLOT1_ABSENT (0u) |
|
#define | SAT_CH0_SLOT2_PRESENT (BIT2) |
|
#define | SAT_CH0_SLOT2_ABSENT (0u) |
|
#define | SAT_CH1_SLOT0_PRESENT (BIT3) |
|
#define | SAT_CH1_SLOT0_ABSENT (0u) |
|
#define | SAT_CH1_SLOT1_PRESENT (BIT4) |
|
#define | SAT_CH1_SLOT1_ABSENT (0u) |
|
#define | SAT_CH1_SLOT2_PRESENT (BIT5) |
|
#define | SAT_CH1_SLOT2_ABSENT (0u) |
|
#define | SAT_CH2_SLOT0_PRESENT (BIT6) |
|
#define | SAT_CH2_SLOT0_ABSENT (0u) |
|
#define | SAT_CH2_SLOT1_PRESENT (BIT7) |
|
#define | SAT_CH2_SLOT1_ABSENT (0u) |
|
#define | SAT_CH2_SLOT2_PRESENT (BIT8) |
|
#define | SAT_CH2_SLOT2_ABSENT (0u) |
|
#define | SAT_CH3_SLOT0_PRESENT (BIT9) |
|
#define | SAT_CH3_SLOT0_ABSENT (0u) |
|
#define | SAT_CH3_SLOT1_PRESENT (BIT10) |
|
#define | SAT_CH3_SLOT1_ABSENT (0u) |
|
#define | SAT_CH3_SLOT2_PRESENT (BIT11) |
|
#define | SAT_CH3_SLOT2_ABSENT (0u) |
|
#define | SQUIB_CH0_NOT_FIRED CLEAR |
|
#define | SQUIB_CH1_NOT_FIRED CLEAR |
|
#define | SQUIB_CH2_NOT_FIRED CLEAR |
|
#define | SQUIB_CH3_NOT_FIRED CLEAR |
|
#define | SQUIB_CH4_NOT_FIRED CLEAR |
|
#define | SQUIB_CH5_NOT_FIRED CLEAR |
|
#define | SQUIB_CH6_NOT_FIRED CLEAR |
|
#define | SQUIB_CH7_NOT_FIRED CLEAR |
|
#define | SQUIB_CH8_NOT_FIRED CLEAR |
|
#define | SQUIB_CH9_NOT_FIRED CLEAR |
|
#define | SQUIB_CH10_NOT_FIRED CLEAR |
|
#define | SQUIB_CH11_NOT_FIRED CLEAR |
|
#define | SAT_CH0_SLOT0_NOT_CRASHED CLEAR |
|
#define | SAT_CH0_SLOT1_NOT_CRASHED CLEAR |
|
#define | SAT_CH0_SLOT2_NOT_CRASHED CLEAR |
|
#define | SAT_CH1_SLOT0_NOT_CRASHED CLEAR |
|
#define | SAT_CH1_SLOT1_NOT_CRASHED CLEAR |
|
#define | SAT_CH1_SLOT2_NOT_CRASHED CLEAR |
|
#define | SAT_CH2_SLOT0_NOT_CRASHED CLEAR |
|
#define | SAT_CH2_SLOT1_NOT_CRASHED CLEAR |
|
#define | SAT_CH2_SLOT2_NOT_CRASHED CLEAR |
|
#define | SAT_CH3_SLOT0_NOT_CRASHED CLEAR |
|
#define | SAT_CH3_SLOT1_NOT_CRASHED CLEAR |
|
#define | SAT_CH3_SLOT2_NOT_CRASHED CLEAR |
|
#define | SAT_CH0_SLOT0_CRASHED BIT0 |
|
#define | SAT_CH0_SLOT1_CRASHED BIT1 |
|
#define | SAT_CH0_SLOT2_CRASHED BIT2 |
|
#define | SAT_CH1_SLOT0_CRASHED BIT3 |
|
#define | SAT_CH1_SLOT1_CRASHED BIT4 |
|
#define | SAT_CH1_SLOT2_CRASHED BIT5 |
|
#define | SAT_CH2_SLOT0_CRASHED BIT6 |
|
#define | SAT_CH2_SLOT1_CRASHED BIT7 |
|
#define | SAT_CH2_SLOT2_CRASHED BIT8 |
|
#define | SAT_CH3_SLOT0_CRASHED BIT9 |
|
#define | SAT_CH3_SLOT1_CRASHED BIT10 |
|
#define | SAT_CH3_SLOT2_CRASHED BIT11 |
|
#define | SBC_N_SATELLITES_POSSIBLE 12u |
|
#define | SBC_N_SQUIBS_POSSIBLE 12u |
|
#define | SBC_SENSOR_DATA_ARRAY_SIZE 264u |
|
#define | SBC_N_CONFIG_BUFFER_SIZE 60u |
|
#define | SBC_FIRED_SQUIB_MIN_TIME 0x8u |
|
#define | SBC_TEST_SBC_FAILED BIT14 |
|
#define | SBC_TEST_SAT_0 BIT0 |
|
#define | SBC_TEST_SAT_1 BIT1 |
|
#define | SBC_TEST_SAT_2 BIT2 |
|
#define | SBC_TEST_SAT_3 BIT3 |
|
#define | SBC_TEST_SAT_4 BIT4 |
|
#define | SBC_TEST_SAT_5 BIT5 |
|
#define | SBC_TEST_SAT_6 BIT6 |
|
#define | SBC_TEST_SAT_7 BIT7 |
|
#define | SBC_TEST_SAT_8 BIT8 |
|
#define | SBC_TEST_SAT_9 BIT9 |
|
#define | SBC_TEST_SAT_10 BIT10 |
|
#define | SBC_TEST_SAT_11 BIT11 |
|
#define | SBC_TEST_ALL_SAT (BIT12 - 1u) |
|
#define | SBC_TEST_SQUIB_0 BIT16 |
|
#define | SBC_TEST_SQUIB_1 BIT17 |
|
#define | SBC_TEST_SQUIB_2 BIT18 |
|
#define | SBC_TEST_SQUIB_3 BIT19 |
|
#define | SBC_TEST_SQUIB_4 BIT20 |
|
#define | SBC_TEST_SQUIB_5 BIT21 |
|
#define | SBC_TEST_SQUIB_6 BIT22 |
|
#define | SBC_TEST_SQUIB_7 BIT23 |
|
#define | SBC_TEST_SQUIB_8 BIT24 |
|
#define | SBC_TEST_SQUIB_9 BIT25 |
|
#define | SBC_TEST_SQUIB_10 BIT26 |
|
#define | SBC_TEST_SQUIB_11 BIT27 |
|
#define | SBC_TEST_ALL_SQUIB (BIT28 - 1u) |
|
#define | N_ELEMENTS(X) (sizeof(X)/sizeof(*(X))) |
Functions |
| uint8_t | u8fnSBCPreSchedulerEnableWarningLamp (uint8_t u8Enable) |
| | This routine shall be called before the scheduler has been launched to turn on the warning lamp connected to the SBC.
|
| uint8_t | u8fnSBCEnableWarningLamp (uint8_t u8Enable) |
| | This routine shall be called after the scheduler has been launched to turn on the warning lamp connected to the SBC.
|
| void | vfnSBCPreSchedulerInit (void) |
| | This routine shall be called before the scheduler has been launched to initialize the SBC.
|
| void | vfnSBCResetPin (uint32_t u32State) |
| | Sets a logical level on the SBC's reset pin.
|
| uint32_t | u32fnSBCInit (void) |
| | This routine shall be called after the scheduler has been launched to initialize the SBC.
|
| uint32_t | u32fnSBCPerformInitialTests (void) |
| | This routine performs initial tests on the SBC at startup to guarantee operation. It includes POM, ADC, Mux, and FLM tests.
|
| uint32_t | u32fnSBCSchedulePSISat (uint16_t *pu16RawAccelArray) |
| | Schedules reading from all PSI5 satellites.
|
| uint8_t | u8fnSBCSchedulePSync (void) |
| | Schedules a synchronization pulse for synchronous PSI5 satellites. May not be necessary if the SBC is generating them automatically.
|
| uint8_t | u8fnSBCSyncSM (const uint8_t u8Period) |
| | Synchronizes the SBC to a given period with the watch-dog 2 as a reference clock. Necessary to guarantee accuracy regarding PSI5 sync pulses.
|
| uint32_t | u32fnSBCExtractPSISat (uint16_t *pu16RawAccelArray, uint16_t *pu16Filtered) |
| | Transforms raw data returned by satellites into usable data.
|
| uint32_t | u32fnSBCScheduleCmd (uint8_t u8Cmd, uint8_t u8Arg, uint16_t *pu16Response) |
| | Schedules a specific command to be sent.
|
| uint32_t | u32fnSBCFireSquibs (const uint16_t cu16SquibMask) |
| | Complete sequence of commands used to fire any number of squibs.
|
| uint16_t | u16fnSBCGatherPSI5SatelliteData (uint8_t *pu8PSI5Data) |
| | First, this function instructs the SBC to turn automatic Sync-pulse generation. Next, and according to the PSI5 standard, it captures all satellite initial data, places it into an array, and returns a status indicating if satellites are happy or not.
|
| uint32_t | u32fnSBCSquibFiringStatus (uint16_t *pu16Response) |
| | Reads back fire counter for all squibs. If anyone of them surpass a defined threshold (SBC_FIRED_SQUIB_MIN_TIME), they're flagged as "fired.".
|
Variables |
| uint32_t | gu32SBCTime |
| uint16_t | gu16ActivePSI5Channels |
| uint16_t | gu16ActiveSquibChannels |
| uint16_t | gu16FiredSquibs |
| uint16_t | gu16SquibsToFire |
| uint16_t | gu16CrashedSatellites |
| uint16_t | gu16ConfirmedSatellites |
|
uint8_t | gu8SBCSatelliteData [] |
| const uint16_t | cu16PresentSquibs |
| const uint16_t | cu16PresentSatellites |
System basis chip abstraction layer for airbag application. Upper layers shouldn't talk directly with the SBC driver to avoid file dependencies in the application.
Copyright (c) 2011 Freescale Semiconductor Freescale Confidential Proprietary
- Author:
- Freescale Semiconductor
-
SASD Automotive
-
R11515
-
R54967
- Version:
- Date:
- Warning:
- (If needed)
History: